/**
 * Looker  新闻整合系统
 * Author  :solosky
 * File    :MonitorStatus.java
 * Date    :Jun 18, 2009
 * Lisence : Apache License 2.0 
 */
package net.looker.manager;

import java.io.Serializable;

import net.looker.monitor.schdule.Monitor;

/**
 * 监视器状态类
 * @author solosky
 *
 */
public class MonitorStatus implements Serializable
{	
	/**
	 * 
	 */
	private static final long serialVersionUID = -299264228537030109L;

	/**
	 * 监视器名
	 */
	private String name;
	
	/**
	 * 监视器ＩＤ
	 */
	private String hash;
	
	/**
	 * 当前运行状态
	 */
	private Monitor.STATUS status;
	
	/**
	 * 当前操作
	 */
	private Monitor.ACTION action;
	
	/**
	 * 下一次更新时间
	 */
	private long nextCheckTime;
	
	/**
	 * 更新间隔
	 */
	private long interval;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the status
	 */
	public Monitor.STATUS getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(Monitor.STATUS status) {
		this.status = status;
	}

	/**
	 * @return the action
	 */
	public Monitor.ACTION getAction() {
		return action;
	}

	/**
	 * @param action the action to set
	 */
	public void setAction(Monitor.ACTION action) {
		this.action = action;
	}

	/**
	 * @return the nextCheckTime
	 */
	public long getNextCheckTime() {
		return nextCheckTime;
	}

	/**
	 * @param nextCheckTime the nextCheckTime to set
	 */
	public void setNextCheckTime(long nextCheckTime) {
		this.nextCheckTime = nextCheckTime;
	}

	/**
	 * @return the interval
	 */
	public long getInterval() {
		return interval;
	}

	/**
	 * @param interval the interval to set
	 */
	public void setInterval(long interval) {
		this.interval = interval;
	}
	
	public String toString()
	{
		return this.name+": [Action-"+this.action.name()+" STATUS:"+this.status.name()+"]";
	}

	/**
	 * @return the hash
	 */
	public String getHash() {
		return hash;
	}

	/**
	 * @param hash the hash to set
	 */
	public void setHash(String hash) {
		this.hash = hash;
	}
}
